#!/bin/bash

# kubectl批量删除pvc
kubectl get pvc -n nacos-ns > tmp.txt
cat tmp.txt |awk '{split($0,a," ");print a[1]}' > tmp2.txt
for line in `cat tmp2.txt`
do
kubectl delete pvc -n nacos-ns $line
done